
import inputUI from './inputUI';
import { connect } from 'react-redux'
import { addAction ,changAction} from '../store/createAction';

const mapStateToProps = state => {
    return {
        inputValue:state.inputValue
    }
}
const mapDispatchToProps = (dispatch) => {
    return {
        handleChangeInputValue:(e) => {
             const val = e.target.value;
             dispatch(changAction(val))
        },
        handleAddItem:() => {
            dispatch(addAction())
        }
    }
  }


const InputAddItem = connect(
    mapStateToProps,
    mapDispatchToProps
)(inputUI)

export default InputAddItem;
